Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port bessel functions from scipy #153

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Port bessel functions from scipy #153

wants to merge 1 commit into from

Conversation

Luthaf
Copy link
Member

@Luthaf Luthaf commented Jan 27, 2023

(opening a draft PR in case someone wants to help bring this to completion)

This PR adds most of the bessel functions to rascaline, porting them from scipy/cephes. These functions will be needed for a native implementation of the LE basis, and to implement numerical integration in the radial integral.

The main thing missing is a set of tests for the jv and yv bessel functions, for input values all over the range where these functions are defined, and triple checking around any poles/special points.

@github-actions
Copy link

The documentation for this PR is (or will soon be) available on readthedocs: https://rascaline--153.org.readthedocs.build/en/153/

@github-actions
Copy link

Here is a pre-built version of the code in this pull request: wheels.zip, you can install it locally by unzipping wheels.zip and using pip to install the file matching your system

@PicoCentauri
Copy link
Contributor

This is very useful for the LE basis and the monomials!

Are we exporting these to Python as well? We need these functions for the tabulated splining if we don't want to add scipy as an additional dependency. Unfortunately, we would also need the derivatives as defined i.e. in scipy.special.spherical_jn.

@Luthaf
Copy link
Member Author

Luthaf commented Jul 24, 2023

Exporting these to Python was not really the plan since we are not in the business of providing special functions implementations (and actually most of this code would be better in a separate special-fn crate). I would rather add an optional dependency on scipy for this.

The idea for these was more to provide "creation of arbitrary radial basis splines" directly on the Rust side, or a pure Rust implementation of the LE basis.

@PicoCentauri
Copy link
Contributor

Okay I see. I am asking because I am doing a general SplinedRadialBasis class in Python which will include LE and monomials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants